Opening a file in C

C - Programming Language

Created: 2022-07-10
Tags: #fleeting


Syntax

FILE *ptr
#include <stdio.h>
ptr = fopen("file_path", "mode");
Types of Files you can open with fopen()

  1. Text Files
  2. Binary Files

In C you can
-> Create a new file
-> Open/Close file
-> Reading AND writing info to file